package com.hopu.oa.dao.task;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hopu.oa.entity.management.AoaTypeList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface TypeListDao extends BaseMapper<AoaTypeList> {

    @Select("select * from aoa_type_list where type_name=#{typeName}")
    AoaTypeList getType(String typeName);


    @Select("select type_name from aoa_type_list where type_id=#{typeId}")
    String getTypeNameById(Integer typeId);

    @Select("select * from aoa_type_list")
    List<AoaTypeList> selectAllType();
}
